#!/bin/bash
file=$1
filename=`basename $file`
dir="/home/zhangyi/errlog/html"
script="/home/zhangyi/workspace/script/parse_errlog/parse_errlog.py"
echo "python $script --file $file --format html --name $filename --dir $dir"
python $script --file $file --format html --name $filename --dir $dir
if [ -f "$dir/$filename" ]; then
	mv "$dir/$filename" "$dir/$filename.html"
	echo "$dir/$filename.html"
	cd $dir
	wslview $filename.html
fi
